/**
*  \class MatrixTest
*  \brief Implements the unit tests for \c Matrix class.
*  \author Marco Gregnanin
*  \author Riccardo Marson
*  \version 1.11.1a
*  \date    10 February 2011
*/

#ifndef MATRIXTEST_H
#define MATRIXTEST_H


#include "../MathLib/matrix.cpp"
#include <iostream>
#include <QObject>


using namespace MathLib;


class MatrixTest : public QObject
{
    Q_OBJECT

public:
    MatrixTest();                       //!< \c MatrixTest class constructor

private Q_SLOTS:
    void testEmptyMatrix();             //!< Unit test for empty matrix constructor
    void testMatrix();                  //!< Unit test for N-dimensional matrix constructor
    void testCopyMatrix();              //!< Unit test for copy matrix constructor

    void testGetDimensions();           //!< Unit test for dimensions accessor
    void testGetLength();               //!< Unit test for length accessor
    void testGetSize();                 //!< Unit test for size accessor

    void testDataAccessBySingleIndex();     //!< Unit test for matrix data access operator '()'
    void testDataAccessByTwoIndices();      //!< Unit test for 2D matrix data access operator '()'
    void testAssignmentMatrix();            //!< Unit test for matrix assignment operator '=' with Matrix input
    void testAssignmentDataType();          //!< Unit test for matrix assignment operator '=' with DataType input
    void testAdditionMatrix();              //!< Unit test for matrix addition operator '+=' with Matrix input
    void testAdditionDataType();            //!< Unit test for matrix addition operator '+=' with DataType input
    void testSumMatrix();                   //!< Unit test for matrix sum operator '+' with Matrix input
    void testSumDataType();                 //!< Unit test for matrix sum operator '+' with DataType input
    void testSubtractionMatrix();           //!< Unit test for matrix subtraction operator '-=' with Matrix input
    void testSubtractionDataType();         //!< Unit test for matrix subtraction operator '-=' with DataType input
    void testDifferenceMatrix();            //!< Unit test for matrix difference operator '-' with Matrix input
    void testDifferenceDataType();          //!< Unit test for matrix difference operator '-' with DataType input
    void testMultiplicationMatrix();        //!< Unit test for matrix multiplication operator '*=' with Matrix input
    void testMultiplicationDataType();      //!< Unit test for matrix multiplication operator '*=' with DataType input
    void testProduct2DMatrix();             //!< Unit test for matrix product operator '*' with 2D Matrix input
    void testProduct1DMatrix();             //!< Unit test for matrix product operator '*' with 1D Matrix input
    void testProductDataType();             //!< Unit test for matrix product operator '*' with DataType input
    void testEqualityMatrix();              //!< Unit test for matrix equality operator '==' with Matrix input
    void testEqualityDataType();            //!< Unit test for matrix equality operator '==' with DataType input
    void testInequalityMatrix();            //!< Unit test for matrix inequality operator '!=' with Matrix input
    void testInequalityDataType();          //!< Unit test for matrix inequality operator '!=' with DataType input
    void testGreaterThanMatrix();           //!< Unit test for matrix greater than operator '>' with Matrix input
    void testGreaterThanDataType();         //!< Unit test for matrix greater than operator '>' with DataType input
    void testGreaterThanEqualToMatrix();    //!< Unit test for matrix greater than or equal to operator '>=' with Matrix input
    void testGreaterThanEqualToDataType();  //!< Unit test for matrix greater than or equal to operator '>=' with DataType input
    void testLowerThanMatrix();             //!< Unit test for matrix lower than operator '<' with Matrix input
    void testLowerThanDataType();           //!< Unit test for matrix lower than operator '<' with DataType input
    void testLowerThanEqualToMatrix();      //!< Unit test for matrix lower than or equal to operator '<=' with Matrix input
    void testLowerThanEqualToDataType();    //!< Unit test for matrix lower than or equal to operator '<=' with DataType input
    void testCopy();                        //!< Unit test for matrix copy operator

    void testIsEqualTo();               //!< Unit test for matrix comparison accessor
    void testIsSymmetric();             //!< Unit test for symmetric matrix property accessor

    void testCholesky();                //!< Unit test for matrix Cholesky decomposition method
    void testDiag();                    //!< Unit test for matrix diagonal extraction method
    void testTrace();                   //!< Unit test for matrix trace method
    void testTranspose();               //!< Unit test for matrix transpose extraction method
};


#endif // MATRIXTEST_H
